package com.yowasa.xiuxian.engine.message.help;

import com.yowasa.xiuxian.annoations.CMD;
import com.yowasa.xiuxian.engine.message.CmdMessageHandler;
import com.yowasa.xiuxian.entity.enums.CmdScopeEnum;
import com.yowasa.xiuxian.entity.mys.MysComponent;
import com.yowasa.xiuxian.entity.mys.SendMessage;
import com.yowasa.xiuxian.service.helper.MessageHelper;
import com.yowasa.xiuxian.util.ComponentUtil;
import org.springframework.beans.factory.annotation.Autowired;

import java.util.List;

/**
 * 获取描述
 */
@CMD(name = "/商店", scope = CmdScopeEnum.ALL,outCmd = true)
public class ShopHandler extends CmdMessageHandler {
    @Autowired
    private MessageHelper messageHelper;

    @Override
    public void execute(SendMessage message) {
        MysComponent component = new MysComponent("1",2,"交易行","/交易行");
        MysComponent componentA = new MysComponent("2",2,"拍卖行","/拍卖行");
        MysComponent componentB = new MysComponent("3",2,"历练商店","/纪念品商店");
        MysComponent componentC = new MysComponent("4",2,"精粹商店","/精粹商店");
        MysComponent componentD = new MysComponent("5",2,"星辉商店","/星辉商店");
        MysComponent componentE = new MysComponent("6",2,"战场宝库","/战场宝库");

        List<List<MysComponent>> lists = ComponentUtil.genComponentList(2, component, componentA, componentB, componentC, componentD, componentE);

        messageHelper.replyMysPanel(message, "交易行仅在主城可使用，使用摩拉结算\n拍卖行是玩家交易的地方，可以上架与求购\n纪念品商店使用历练值结算，精粹商店与星辉商店分别使用精粹与星辉\n精粹可通过分解装备获取，星辉是祈愿抽卡的副产物",null,lists,null);
    }

    public String desc(){
        return new StringBuffer().append("商店！！！\n")
                .toString();

    }
}
